import socket

def connect_to_server(host, port, operation, num1, num2):
    client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    client_socket.connect((host, port))

    data = f"{operation},{num1},{num2}"
    client_socket.send(data.encode())

    result = client_socket.recv(1024).decode()
    print(f"Result: {result}")

    client_socket.close()

if __name__ == '__main__':
    connect_to_server('localhost', 1234, 'add', 5, 3)
